#!/bin/bash
# Receive files from a remote host

if [ -n "$1" ] 
then 
	_port=$1
else  
	_port=1200 # Default, if not specified on command line.
fi

echo "Listening on port: $_port. Waiting for incoming files..."

nc6 -l -p $_port | pv | tar xvz && echo "Transfer complete."

